package org.cary.lucene.search;

import java.util.List;

import org.apache.lucene.search.Query;
import org.cary.common.Page;
import org.cary.lucene.StoreBean;

public interface SearchEngine {

	/**
	 * 创建索引
	 */
	public void addIndex(StoreBean bean) throws Exception;

	public void addIndex(List<StoreBean> beans) throws Exception;

	/**
	 * 更新索引
	 */
	public void updateIndex(StoreBean bean) throws Exception;

	public void updateIndexs(List<StoreBean> bean) throws Exception;

	/**
	 * 删除索引
	 */
	public void deleteIndex(StoreBean bean) throws Exception;

	public void deleteIndexs(List<StoreBean> beans) throws Exception;

	/**
	 * 进行检索分页
	 */
	public abstract Page<StoreBean> search(Query bean, boolean isHighlighter, Page<StoreBean> page) throws Exception;

}
